package com.xiaoxu.rental.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xiaoxu.rental.entity.Role;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author xtq
* @description 针对表【sys_role】的数据库操作Service
* @createDate 2024-07-26 08:40:20
*/
public interface RoleService extends IService<Role> {

    Page<Role> selectList(Page<Role> page, Role role);
    //根据角色id,查询到关联的用户
    boolean hasUser(Integer id);
    boolean delete(String ids);


    public boolean assignPermission(Integer roleId, List<Integer> permissionIds);

    //获取当前用户所绑定的角色id
    List<Integer> selectRoleIdByUserId(Integer userId);
}
